<?php
class UploadController extends DRX_Controller 
{
	function indexAction()
	{
        //Do upload file
        // Edit upload location here
        $upload_dir = APPLICATION_DIR . '/public/upload/';
        $name = "file200_" . $_FILES['attach_file']['name'];					
        $server_copy = $upload_dir . $name;	
        
        if (move_uploaded_file($_FILES['attach_file']['tmp_name'],$server_copy))
        {
            $result = $server_copy;
            // do st
        }
        else 
        {
            $result = "Error";
        }
        sleep(1);
        $smarty = DRX::load('smarty');
        $smarty->assign('result',$result);
        $smarty->display("issue/end_upload.tpl");
	}
}
?>